#include<time.h>
#include<sys/time.h>

time_t time(time_t *t)
{
    timeval_t tv;

    if(gettimeofday(&tv,0))
        return -1;
    if(t)
        *t=tv.tv_sec;
    return tv.tv_sec;
}

